package com.abocode.aichat.server.context.handler;

import com.abocode.aichat.server.context.ServerRuntimeContext;
import io.netty.channel.Channel;
import io.netty.channel.ChannelHandler;


/**
 * @author guanxf
 */
@ChannelHandler.Sharable
public class ProtocolServerInboundHandler extends ServerInboundHandler {
    public ProtocolServerInboundHandler(ServerRuntimeContext serverRuntimeContext) {
        super(serverRuntimeContext);
    }

    @Override
    public void registerChannel(Channel channel) {
        serverRuntimeContext.getProtocolChannelRegistry().register(channel);
    }

    @Override
    public void unRegisterChannel(Channel channel) {
        serverRuntimeContext.getProtocolChannelRegistry().unregister(channel);
    }
}
